const TOKEN_KEY = "geek_token"

// 获取
export const getTokenInfo = () => {
    return JSON.parse(localStorage.getItem(TOKEN_KEY)) || {}
}
// 设置
export const setTokenInfo = tokenInfo => {
    localStorage.setItem(TOKEN_KEY , JSON.stringify(tokenInfo))
}
// 移除
export const removeTokenInfo = () => {
    localStorage.removeItem(TOKEN_KEY)
}
// 判断有无token
export const isAuthToken = () => getTokenInfo().token